/**
 * @ author: 汪孟苹
 */
define([], function () {
	var tpl = {}

	/* queue */
	tpl.queue = function () {
		return queue()
	}
	/* 顶部统计 */
	tpl.windowTop = function () {
		return windowTop()
	}
	/* 底部统计 */
	tpl.windowPt = function () {
		return windowPt()
	}
	/* 队列卡片 */
	tpl.queueCard = function () {
		return queueCard()
	}
	/* 患者列表 */
	tpl.babyList = function () {
		return BabyList_check()
	}
	/* 姓氏 */
	tpl.firstName = function () {
		return firstName()
	}
	/* 建档wrap */
	tpl.archiveWrap = function () {
		return archiveWrap()
	}
	/* 今日门诊 */
	tpl.userOprList = function () {
		return userOprList()
	}

	var queue = function () {
		return '<script id="tpl_workBench_queue" type="text/html">' +
			'	<option value="">全部队列</option>' +
			'	{{each list as value i}}' +
			'	  	<option value="{{value.id}}">{{value.queueName}}</option>' +
			'	{{/each}}' +
			'</script>'
	}
	var windowTop = function () {
		return '<script id="tpl_workBench_windowTop" type="text/html">' +
			'	<div class="col-sm-2 col-md-2">' +
			'		<div class="dashboard-report-card dashboard-add">' +
			'			<div class="text-center" id="addPatient">' +
			'				<div><i class="fa fa-plus dashboard-add-icon"></i></div>' +
			'				<div class="dashboard-add-label">添加患者</div>' +
			'			</div>' +
			'		</div>' +
			' 	</div>' +
			'	<div class="col-sm-2 col-md-2">' +
			'  		<div  class="dashboard-report-card">' +
			'			<div class="row">' +
			'				<div class="col-sm-3 col-md-3"><img class="statics-icon" src="page/followup/imgs/workBench/todayDone.png"></div>' +
			'				<div class="col-sm-9 col-md-9 text-right">' +
			'					<div class="dashboard-report-val"><span class="timer">{{todayFollowNum}}</span>人</div>' +
			'					<div class="dashboard-report-label">今日门诊人数</div>' +
			'				</div>' +
			'			</div>' +
			'		</div>' +
			'  	</div>' +
			'  	<div class="col-sm-2 col-md-2">' +
			'  		<div  class="dashboard-report-card">' +
			'			<div class="row">' +
			'				<div class="col-sm-3 col-md-3"><img class="statics-icon" src="page/followup/imgs/workBench/todayAdd.png"></div>' +
			'				<div class="col-sm-9 col-md-9 text-right">' +
			'					<div class="dashboard-report-val"><span class="timer">{{todayArchiveNum}}</span>人</div>' +
			'					<div class="dashboard-report-label">今日建档患者</div>' +
			'				</div>' +
			'			</div>' +
			'		</div>' +
			'  	</div>' +
			'  	<div class="col-sm-2 col-md-2">' +
			'  		<div  class="dashboard-report-card">' +
			'			<div class="row">' +
			'				<div class="col-sm-3 col-md-3"><img class="statics-icon" src="page/followup/imgs/workBench/SumNumber.png"></div>' +
			'				<div class="col-sm-9 col-md-9 text-right">' +
			'					<div class="dashboard-report-val"><span class="timer">{{totalFollowNum}}</span>人</div>' +
			'					<div class="dashboard-report-label">检查患者总数</div>' +
			'				</div>' +
			'			</div>' +
			'		</div>' +
			'  	</div>' +
			'  	<div class="col-sm-2 col-md-2">' +
			'  		<div  class="dashboard-report-card">' +
			'			<div class="row">' +
			'				<div class="col-sm-3 col-md-3"><img class="statics-icon" src="page/followup/imgs/workBench/Overdue.png"></div>' +
			'				<div class="col-sm-9 col-md-9 text-right">' +
			'					<div class="dashboard-report-val"><span class="timer">{{todayLostNum}}</span>人</div>' +
			'					<div class="dashboard-report-label">今日失访人数</div>' +
			'				</div>' +
			'			</div>' +
			'		</div>' +
			'  	</div>' +
			'</script>'
	}
	var windowPt = function () {
		return '<script id="tpl_workBench_windowPt" type="text/html">' +
			'	计划{{totalPlanNum}}人/已随访{{todayFinshNum}}人/进行中{{todayAlsoNum}}人' +
			'</script>'
	}
	var queueCard = function () {
		return '<script id="tpl_workBench_queueCard" type="text/html">' +
			'	<div class="modal-addPatient clearfix">' +
			'		{{each list as value i}}' +
			'			<div data-queueId="{{value.id}}">' +
			'				<img class="workBench-queueImg" src="{{value.queueIcon}}">' +
			'				<span>{{value.queueName}}</span>' +
			'			</div>' +
			'		{{/each}}' +
			'	</div>' +
			'</script>'
	}
	var BabyList_check = function () {
		return '<script id="tpl_workBench_babyList" type="text/html">' +
			'{{each rows as value i}}' +
			'	{{if value.userId}}' +
			'	<div class="col-sm-6 col-md-4 col-lg-3 babycardCheck clickbabycard" userId="{{value.userId}}" remark="{{value.remark}}">' +
			'		<div class="clearfix">' +
			'			<div class="pull-left babycardCheck-hisno ellipsis-1">{{if value.hisNo}}{{value.hisNo}}{{else}}{{value.phoneNo}}{{/if}}</div>' +
			'			<div class="pull-right babycardCheck-ischeck ellipsis-1">' +
			'				{{if value.taskAuditFlag=="Y"}}<i class="fa fa-question-circle" aria-hidden="true" data-toggle="tooltip" data-placement="left" title="内容待审核"></i>{{/if}}' +
			'			</div>' +
			'		</div>' +
			'		<div class="babycardCheck-row02 clearfix">' +
			'			<div class="pull-left babycardCheck-avatar clickbabycard-icon"><img src="page/res/imgs/{{if value.gender == "F" && value.queueUserType == "0"}}icon_girl{{else if value.gender == "M" && value.queueUserType == "0"}}icon_boy{{else}}icon_mother{{/if}}.png"></div>' +
			'			<div class="pull-left babycardCheck-con">' +
			'				<div class="clearfix">' +
			'					<span class="babycardCheck-name clickbabycard-name ellipsis-1">{{if value.isPremature}}<i class="babycardCheck-premature">早</i>{{/if}}{{value.userName}}</span>' +
			'					<span class="babycardCheck-age ellipsis-1">{{value.age}}</span>' +
			'				</div>' +
			'				<div class="babycardCheck-queuename clickbabycard-queuename ellipsis-1">{{value.queueName}}</div>' +
			'			</div>' +
			'		</div>' +
			'		<div class="progress-wrap">' +
			'			{{each value.nodeStatusArr as item i}}' +
			'				<div style="width:{{value.width}}"><i class="{{item.className}}" data-toggle="tooltip" data-placement="top" title="{{item.title}}"></i></div>' +
			'			{{/each}}' +
			'		</div>' +
			'	</div>' +
			'	{{else}}' +
			'		<div class="col-sm-6 col-md-4 col-lg-3 babycardCheck"></div>' +
			'	{{/if}}' +
			'{{/each}}' +
			'</script>'
	}
	var firstName = function () {
		return '<script id="tpl_workBench_firstName" type="text/html">' +
			'   {{each rows as value i}}' +
			'	    <button type="button" class="btn btn-default">{{value}}</button>' +
			'	{{/each}}' +
			'</script>'
	}
	var archiveWrap = function () {
		return '<script id="tpl_workBench_archiveWrap" type="text/html">' +
			'	<div class="archive-wrap">' +
			'		{{if list.length > 1}}' +
			'		<div class="schemes-box form-horizontal clearfix">' +
			'			{{if list.length <= 4}}' +
			'				<div class="qaCard form-group form-group-sm col-sm-6 col-md-6 grid-label-7">' +
			'					<label class="control-label">随访方案</label>' +
			' 			  		<div class="control-input radio">' +
			'						{{each list as value i}}' +
			'							<label class="radio-inline">' +
			'								<input type="radio" name="scheme" value="{{value.id}}" {{if i==0}}checked{{/if}}>' +
			'								{{value.schemeName}}' +
			'							</label>' +
			'						{{/each}}' +
			' 			 		</div>' +
			'				</div>' +
			'			{{else}}' +
			'				<div class="qaCard form-group form-group-sm col-sm-6 col-md-6 grid-label-7">' +
			'					<label class="control-label">随访方案</label>' +
			' 			  		<div class="control-input">' +
			'						<select class="form-control" name="scheme">' +
			'							{{each list as value i}}' +
			' 			  				<option value="{{value.id}}" {{if i==0}}selected{{/if}}>{{value.schemeName}}</option>' +
			'							{{/each}}' +
			'						</select>' +
			' 			 		</div>' +
			'				</div>' +
			'			{{/if}}' +
			'		</div>' +
			'		{{/if}}' +
			'		<div class="archive-box" id="archiveBox"></div>' +
			'		<div class="archive-btn-box"><div id="archiveSave" class="btn btn-primary">保存</div></div>' +
			'	</div>' +
			'</script>'
	}
	var userOprList = function () {
		return '<script id="tpl_workBench_operateList" type="text/html">' +
			'{{each list as value i}}' +
			'	<div class="row baby-done">' +
			'		<div class="col-sm-6 col-md-6 ellipsis-1">{{value.userName}}</div>' +
			'		<div class="col-sm-6 col-md-6 ellipsis-1 text-right color-9">{{value.opTime}}</div>' +
			'	</div>' +
			'{{/each}}' +
			'</script>'
	}

	return tpl
})